package com.jiangyg.devtools.entity.code;

import com.jiangyg.devtools.ui.table.Column;

import java.io.Serializable;

import static com.jiangyg.devtools.ui.table.Column.Type.CheckBox;
import static com.jiangyg.devtools.ui.table.Column.Type.JavaBaseTypeComboBox;

/**
 * 类描述：Bean属性
 *
 * @author jiangyg
 * @date 2023-08-13
 */
public class BeanProperty implements Serializable {

    /**
     * 选中状态
     */
    @Column(title = "选中", type = CheckBox)
    private boolean selected = true;

    /**
     * 是否主键字段
     */
    private boolean primary;

    /**
     * 原属性名
     */
    @Column(title = "原名称", order = 2)
    private String rawName;

    /**
     * 属性名
     */
    @Column(title = "属性名", order = 3)
    private String name;

    /**
     * 属性名
     */
    @Column(title = "类型", order = 4, type = JavaBaseTypeComboBox)
    private String rawType;

    /**
     * 类型
     */
    private String type;

    /**
     * 注释
     */
    @Column(title = "注释", order = 5)
    private String comment;

    /**
     * Get 方法
     */
    private String getter;

    /**
     * Set 方法
     */
    private String setter;

    public BeanProperty() {
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public boolean isPrimary() {
        return primary;
    }

    public void setPrimary(boolean primary) {
        this.primary = primary;
    }

    public String getRawName() {
        return rawName;
    }

    public void setRawName(String rawName) {
        this.rawName = rawName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRawType() {
        return rawType;
    }

    public void setRawType(String rawType) {
        this.rawType = rawType;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getGetter() {
        return getter;
    }

    public void setGetter(String getter) {
        this.getter = getter;
    }

    public String getSetter() {
        return setter;
    }

    public void setSetter(String setter) {
        this.setter = setter;
    }

}
